'use strict';
function BlogDetailCtrl($scope, $http) {
    var r = window.location.search.substr(1).split("=");
	var id = r[1];
	var url = '/ajax/blog/detail',
	params = {
		'id': id
	};
	$http.post(url, params).then(function(res) {
		if(!res.stat) {
			$scope.blog = res.data.data;
			$(".mainContent").append($scope.blog.content);
		}
	});
}
angular.module('hzyw')
.controller('BlogDetailCtrl', BlogDetailCtrl);